package com.boot.mgt.controller.app

import com.boot.core.result.ResultTo
import com.boot.mgt.model.TaAppExceptionMsg
import com.boot.mgt.service.TaAppExceptionMsgService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

/**
 * @author kawins
 * createTime 2019-03-14 19:35
 */
@RestController
@RequestMapping("/app/exp_msg")
class TaAppExceptionMsgController {

    @Autowired
    private lateinit var taAppExceptionMsgService: TaAppExceptionMsgService

    @PostMapping
    fun insert(@RequestBody taAppExceptionMsg: TaAppExceptionMsg): ResultTo {
        taAppExceptionMsgService.insert(taAppExceptionMsg)
        return ResultTo()
    }

    @GetMapping
    fun selectAll(): ResultTo {
        val list = taAppExceptionMsgService.selectAll()
        return ResultTo().setData("data", list)
    }


}
